package com.leyou.auth.web;

import com.leyou.auth.service.AliAuthService;
import com.leyou.dto.AliOssSignatureDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("ali")
public class AliAuthController {
@Autowired
private AliAuthService aliAuthService;
    //申请上传文件的签名
    @GetMapping("/oss/signature")
    public ResponseEntity<AliOssSignatureDTO>getAliSignature(){

 AliOssSignatureDTO   aliOssSignatureDTO= aliAuthService.getAliSignature();
        return ResponseEntity.ok(aliOssSignatureDTO);
    }
}
